#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import wmi
from re import search
from string import strip

class WinComputer:
    def __init__(self):
        rootWMI = wmi.WMI()
        OS = rootWMI.Win32_OperatingSystem()[0]
        self._computerName = OS.CSName
        self._systemName = OS.Caption
        self._systemVersion = OS.Version
        self._systemSP = str(OS.ServicePackMajorVersion) + '.' + str(OS.ServicePackMinorVersion)
        self._SysDir = OS.WindowsDirectory

    def Infos(self):
        print '---------------------------------------------------------------------------'
        print '  System Informations :'
        print '  + Computername :', self._computerName
        print '  + Oper. System :', self._systemName, self._systemVersion
        print '  + Service Pack :', self._systemSP
        print '  + OS Directory :', self._SysDir
        print '---------------------------------------------------------------------------'

if __name__ == '__main__':
    test = WinComputer()
    WinComputer.Infos(test)
    
    